﻿using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Log4NetDemo
{
    class Program
    {
        static void Main(string[] args)
        {
            //1，通过配置文件读取log4net的配置，然后进行初始化工作
            log4net.Config.XmlConfigurator.Configure();

            //2.写日志
            ILog logWriter = log4net.LogManager.GetLogger("DemoLogWriter");


            logWriter.Debug("sssss调试级别的信息");

            logWriter.Error("sssss错误级别的信息");


            Console.ReadKey();
        }
    }
}
